
using System;
using System.Linq;
using Csla;
using Csla.Data;
using Csla.Security;
using Csla.Validation;

namespace HousingInfo.Library
{ 
	public partial class UserBO : Csla.BusinessBase<UserBO>
	{

		#region Authorization Rules
		protected override void AddAuthorizationRules()
		{
			//TODO: Define authorization rules in UserBO
			//AuthorizationRules.AllowRead(UserNameProperty, "UserBOReadGroup");
			//AuthorizationRules.AllowRead(PasswordProperty, "UserBOReadGroup");
			//AuthorizationRules.AllowRead(FullNameProperty, "UserBOReadGroup");
			//AuthorizationRules.AllowRead(NickYahooProperty, "UserBOReadGroup");
			//AuthorizationRules.AllowRead(NickSkyperProperty, "UserBOReadGroup");
			//AuthorizationRules.AllowRead(TelePhoneProperty, "UserBOReadGroup");
			//AuthorizationRules.AllowRead(MobilePhoneProperty, "UserBOReadGroup");
			//AuthorizationRules.AllowRead(AddressProperty, "UserBOReadGroup");
			//AuthorizationRules.AllowRead(CityProperty, "UserBOReadGroup");
			//AuthorizationRules.AllowRead(UrlWebsiteProperty, "UserBOReadGroup");
			//AuthorizationRules.AllowRead(RegisterDateProperty, "UserBOReadGroup");
			//AuthorizationRules.AllowRead(QuestionIDProperty, "UserBOReadGroup");
			//AuthorizationRules.AllowRead(AnswerQuestionProperty, "UserBOReadGroup");
			//AuthorizationRules.AllowRead(IslockProperty, "UserBOReadGroup");
			//AuthorizationRules.AllowRead(LockDateProperty, "UserBOReadGroup");
			//AuthorizationRules.AllowRead(UnlockDateProperty, "UserBOReadGroup");
			//AuthorizationRules.AllowRead(RoleIDProperty, "UserBOReadGroup");
			//AuthorizationRules.AllowRead(IsAcriveProperty, "UserBOReadGroup");

			//AuthorizationRules.AllowWrite(PasswordProperty, "UserBOWriteGroup");
			//AuthorizationRules.AllowWrite(FullNameProperty, "UserBOWriteGroup");
			//AuthorizationRules.AllowWrite(NickYahooProperty, "UserBOWriteGroup");
			//AuthorizationRules.AllowWrite(NickSkyperProperty, "UserBOWriteGroup");
			//AuthorizationRules.AllowWrite(TelePhoneProperty, "UserBOWriteGroup");
			//AuthorizationRules.AllowWrite(MobilePhoneProperty, "UserBOWriteGroup");
			//AuthorizationRules.AllowWrite(AddressProperty, "UserBOWriteGroup");
			//AuthorizationRules.AllowWrite(CityProperty, "UserBOWriteGroup");
			//AuthorizationRules.AllowWrite(UrlWebsiteProperty, "UserBOWriteGroup");
			//AuthorizationRules.AllowWrite(RegisterDateProperty, "UserBOWriteGroup");
			//AuthorizationRules.AllowWrite(QuestionIDProperty, "UserBOWriteGroup");
			//AuthorizationRules.AllowWrite(AnswerQuestionProperty, "UserBOWriteGroup");
			//AuthorizationRules.AllowWrite(IslockProperty, "UserBOWriteGroup");
			//AuthorizationRules.AllowWrite(LockDateProperty, "UserBOWriteGroup");
			//AuthorizationRules.AllowWrite(UnlockDateProperty, "UserBOWriteGroup");
			//AuthorizationRules.AllowWrite(RoleIDProperty, "UserBOWriteGroup");
			//AuthorizationRules.AllowWrite(IsAcriveProperty, "UserBOWriteGroup");
		}

		protected static void AddObjectAuthorizationRules()
		{
			//TODO: Define object-level authorization rules of UserBO
			//AuthorizationRules.AllowCreate(typeof(UserBO), "UserBOCreateGroup"));
			//AuthorizationRules.AllowEdit(typeof(UserBO), "UserBOEditGroup"));
			//AuthorizationRules.AllowDelete(typeof(UserBO), "UserBODeleteGroup"));
		}
		#endregion //Authorization Rules
		private void AssignParentKey(HousingInfo.DataLinQ.User data)
		{
			 //data.ParentId = ReadProperty<ParentBO>(ParentBOProperty).Id;
		}

	}
}
